package org.duang.http.core;

public class ClientConfig {

	private String userAgent;
	private int maxConnections = 1024;
	private int maxConnectionsPerRoute = maxConnections;
	private int socketTimeout = 10000;
	private int connectionTimeout = 10000;
	private int maxErrorRetry = 3;
	private String encode = "UTF-8";
	private int ioReactorThreadCount = Runtime.getRuntime().availableProcessors();
	private boolean soKeepAlive = true;
	private boolean exceptContinue = true;

	public boolean isExceptContinue() {
		return exceptContinue;
	}

	public boolean isSoKeepAlive() {
		return soKeepAlive;
	}

	public int getIoReactorThreadCount() {
		return ioReactorThreadCount;
	}

	public String getUserAgent() {
		if (null == userAgent || "".equals(userAgent)) {
			userAgent = "";
		}
		return userAgent;
	}

	public int getMaxConnections() {
		return maxConnections;
	}

	public int getMaxConnectionsPerRoute() {
		return maxConnectionsPerRoute;
	}

	public int getSocketTimeout() {
		return socketTimeout;
	}

	public int getConnectionTimeout() {
		return connectionTimeout;
	}

	public int getMaxErrorRetry() {
		return maxErrorRetry;
	}

	public String getEncode() {
		return encode;
	}

}
